﻿<%@ Page Language="C#" MasterPageFile="~/INFTUR.master" AutoEventWireup="true" CodeBehind="ManterDestino.aspx.cs" Inherits="INFTUR.ManterDestino" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="width:400px">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id ="consulta" style="width:400px">
            
        
        
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" DataSourceID="ObsDestino">
                <Columns>
                    <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
                    <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                    <asp:BoundField DataField="Aeroporto" HeaderText="Aeroporto" 
                        SortExpression="Aeroporto" />
                    <asp:BoundField DataField="Lingua" HeaderText="Lingua" 
                        SortExpression="Lingua" />
                    <asp:BoundField DataField="Pais" HeaderText="Pais" SortExpression="Pais" />
                    <asp:BoundField DataField="Moeda" HeaderText="Moeda" SortExpression="Moeda" />
                    <asp:CheckBoxField DataField="Visto" HeaderText="Visto" 
                        SortExpression="Visto" />
                    <asp:TemplateField HeaderText="Atualizar">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbAtualizar" runat="server">Atualizar</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Remover">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbRemover" runat="server" onclick="lbRemover_Click">Remover</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ObsDestino" runat="server" 
                DataObjectTypeName="Negocios.DestinoBO" DeleteMethod="remover" 
                InsertMethod="inserir" OldValuesParameterFormatString="original_{0}" 
                SelectMethod="consultaTodos" TypeName="Negocios.DestinoBOMetodos" 
                UpdateMethod="atualizar">
                <DeleteParameters>
                    <asp:Parameter Name="id" Type="Int32" />
                </DeleteParameters>
            </asp:ObjectDataSource>
            
        
        
        </div>
        <div id= "cadastro" class="divDados" style="width:400px">
        
        
        
            <table class="style1">
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label1" runat="server" Text="ID"></asp:Label>
                    </td>
                    <td class="style6">
                        <asp:TextBox ID="tbID" runat="server"></asp:TextBox>
                        <asp:Button ID="btNovo" runat="server" onclick="btNovo_Click" Text="Novo" />
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label2" runat="server" Text="Nome"></asp:Label>
                    </td>
                    <td class="style6">
                        <asp:TextBox ID="tbNome" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        <asp:Label ID="Label3" runat="server" Text="Aeroporto"></asp:Label>
                    </td>
                    <td class="style5">
                        <asp:TextBox ID="tbAeroporto" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        Lingua</td>
                    <td class="style6">
                        <asp:TextBox ID="tbLingua" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label4" runat="server" Text="Pais"></asp:Label>
                    </td>
                    <td class="style6">
                        <asp:TextBox ID="tbPais" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label5" runat="server" Text="Pacotes"></asp:Label>
                    </td>
                    <td class="style6">
                        <asp:TextBox ID="tbPacotes" runat="server" 
                            ontextchanged="tbPacotes_TextChanged"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label6" runat="server" Text="Moeda"></asp:Label>
                    </td>
                    <td class="style6">
                        <asp:TextBox ID="tbMoeda" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                        <asp:Label ID="Label7" runat="server" Text="Visto"></asp:Label>
                    </td>
                    <td class="style6">
                        <asp:CheckBox ID="cbVisto" runat="server" />
                    </td>
                </tr>
                <tr align="center">
                    <td class="style2" colspan="2">
                        <asp:Button ID="btGravar" runat="server" onclick="btGravar_Click" 
                            Text="Gravar" />
                        <asp:Button ID="btCancelar" runat="server" onclick="btCancelar_Click" 
                            Text="Cancelar" />
                    </td>
                </tr>
            </table>
        
        
        
        </div>
   
    </div>
</asp:Content>